/* vector 迭代器的遍历 */
/*1 2 3 4 5 6*/
#include <iostream>
#include <vector>
using namespace std;

void my_print(vector<int> &v);


int main(int argc, char **argv)
{
    vector<int> v = {1,2,3,4,5,6};

    /* 遍历 */
    my_print(v);

    return 0;

}

/* 打印函数 */
void my_print(vector<int> &v)
{   
    vector<int>::iterator it = v.begin();

    for (; it != v.end(); it++)
    {
        cout << *it << " ";
    } /* end of for (; it != v.end(); it++) */
    
    cout << endl;

    return;
}